'\" te
.\"  Copyright 1989 AT&T  Copyright (c) 1996, Sun Microsystems, Inc.  All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH MKNOD 8 "Sep 16, 1996"
.SH NAME
mknod \- make a special file
.SH SYNOPSIS
.LP
.nf
\fBmknod\fR \fIname\fR b \fImajor\fR \fIminor\fR
.fi

.LP
.nf
\fBmknod\fR \fIname\fR c \fImajor\fR \fIminor\fR
.fi

.LP
.nf
\fBmknod\fR \fIname\fR p
.fi

.SH DESCRIPTION
.LP
\fBmknod\fR makes a directory entry for a special file.
.SH OPTIONS
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fBb\fR\fR
.ad
.RS 5n
Create a block-type special file.
.RE

.sp
.ne 2
.na
\fB\fBc\fR\fR
.ad
.RS 5n
Create a character-type special file.
.RE

.sp
.ne 2
.na
\fB\fBp\fR\fR
.ad
.RS 5n
Create a FIFO (named pipe).
.RE

.SH OPERANDS
.LP
The following operands are supported:
.sp
.ne 2
.na
\fB\fImajor\fR\fR
.ad
.RS 9n
The \fImajor\fR device number.
.RE

.sp
.ne 2
.na
\fB\fIminor\fR\fR
.ad
.RS 9n
The \fIminor\fR device number; can be either decimal or octal. The assignment
of major device numbers is specific to each system. You must be the super-user
to use this form of the command.
.RE

.sp
.ne 2
.na
\fB\fIname\fR\fR
.ad
.RS 9n
A special file to be created.
.RE

.SH USAGE
.LP
See \fBlargefile\fR(7) for the description of the behavior of \fBmknod\fR when
encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
.SH SEE ALSO
.LP
.BR ftp (1),
.BR mknod (2),
.BR symlink (2),
.BR attributes (7),
.BR largefile (7)
.SH NOTES
.LP
If \fBmknod\fR(2) is used to create a device, the major and minor device
numbers are always interpreted by the kernel running on that machine.
.sp
.LP
With the advent of physical device naming, it would be preferable to create a
symbolic link to the physical name of the device (in the \fB/devices\fR
subtree) rather than using \fBmknod\fR.
